/** @format */

import mongoose from "mongoose";

interface User {
    name: string;
    age: number;
}
// 定义模式
const ModelSchema = mongoose.Schema;

const SomeModelSchema = new ModelSchema<User>({
    name: String,
    age: Number,
});

// 使用模式“编译”模型
const UserModel = mongoose.model<User>("users", SomeModelSchema);

export default UserModel;
